package com.ktjy.example.example11.entity;

public class Baby {
    private String name;
    private Woman woman;
    private String gender;


    public Baby(Woman woman, String gender) {
        this.woman = woman;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }


    public Woman getWoman() {
        return woman;
    }


    public String getGender() {
        return gender;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void introduce() {
        System.out.println("我是一个" + getGender() + "宝宝我的妈妈是" + this.getWoman().getName());
        if (name == null) {
            System.out.println("我还没有取名呢");
        } else {
            System.out.println("我叫" + this.getName());
        }
    }


}
